package cn.paul.junit;

import cn.paul.domain4.Order;
import cn.paul.domain4.User;
import cn.paul.mapper4.OrderMapper;
import cn.paul.mapper4.UserMapper;
import cn.paul.utils.SqlSessionUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

/**
 * Created by dell1 on 2017-06-24.
 */
public class ItemTest {
    SqlSession sqlSession = SqlSessionUtils.getSession();

    @Test
    public void test1() {
        OrderMapper orderMapper = sqlSession.getMapper(OrderMapper.class);
        Order order = orderMapper.selectOrderById(1);
        System.out.println(order);
    }

    @Test
    public void test2() {
        UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
        User user = userMapper.selectUserById(1);
    }
}
